﻿
@{
    Layout = null;
    ViewBag.Title = "HomePage";

    DeliveryManage.Models.EmployeePerformance todayInfo = ViewBag.TodayPerformance;
    DeliveryManage.Models.EmployeePerformance monthInfo = ViewBag.MonthPerformance;

    List<DeliveryManage.Models.EmployeePerformance> PerformanceRanking = ViewBag.PerformanceRanking;
    List<DeliveryManage.Models.EmployeePerformance> OrderRanking = ViewBag.OrderRanking;
}

<!DOCTYPE html>
<html class="x-admin-sm">
<head>
    <meta charset="UTF-8">
    <title>欢迎页面</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">

    <link href="~/Content/font.css" rel="stylesheet" />
    <link href="~/Content/layui/css/layui.css" rel="stylesheet" />
    <link href="~/Content/framemain.css" rel="stylesheet" />
    <link href="~/Content/homepage.css" rel="stylesheet" />
    <script src="~/Content/layui/layui.js"></script>
    <script src="~/Scripts/framemain.js"></script>

    
</head>
<body>
    <form id="form1" runat="server" >
        <div class="x-nav">
            <span class="layui-breadcrumb">
                <a href="javascript:;">首页</a>
                <a><cite>我的桌面</cite></a>
            </span>
            <a href="/Home/HomePage" class="layui-btn layui-btn-small" style="line-height:1.6em;margin-top:3px;float:right" onclick="location.reload()" title="刷新">
                <i class="layui-icon layui-icon-refresh" style="line-height:30px"></i>
            </a>
        </div>
        <div class="layui-fluid">
            <div class="layui-row layui-col-space15">
                <div class="layui-col-md12">
                    <div class="layui-card">
                        <div class="layui-card-body ">
                            <blockquote class="layui-elem-quote">
                                亲爱的 @(ViewBag.UserName) ,欢迎回来：
                                <span class="x-red"></span>当前时间:@(DateTime.Now.ToString("yyyy年MM月dd日"))！
                            </blockquote>
                        </div>
                    </div>
                </div>
                <div class="layui-col-md12" style="@((bool)ViewBag.isEmployee?"":"display:none")">
                    <div class="layui-card">
                        <div class="layui-card-header">我的业绩信息</div>
                        <div class="layui-card-body ">
                            <blockquote class="layui-elem-quote">今日业绩</blockquote>
                            <ul class="layui-row layui-col-space10 layui-this x-admin-carousel x-admin-backlog">
                                <li class="layui-col-xs4">
                                    <a title="" href="javascript:;" class="x-admin-backlog-body">
                                        <h2 style="color: black;">总业绩</h2>
                                        <p><cite style="color: #691818;">@todayInfo.TotalFinalAmount (元)</cite></p>
                                    </a>
                                </li>
                                <li class="layui-col-xs4">
                                    <a title="" href="javascript:;" class="x-admin-backlog-body">
                                        <h2 style="color: black;">新单业绩</h2>
                                        <p><cite style="color: #691818;">@todayInfo.NewOrderAmount (元)</cite></p>
                                    </a>
                                </li>
                                <li class="layui-col-xs4">
                                    <a title="" href="javascript:;" class="x-admin-backlog-body">
                                        <h2 style="color: black;">复购单业绩</h2>
                                        <p><cite style="color: #691818;">@todayInfo.RepurchaseOrderAmount (元)</cite></p>
                                    </a>
                                </li>
                                <li class="layui-col-xs4">
                                    <a title="" href="javascript:;" class="x-admin-backlog-body">
                                        <h2 style="color: black;">录单数量</h2>
                                        <p><cite style="color: #691818; ">@todayInfo.AddOrderNum (个)</cite></p>
                                    </a>
                                </li>
                                <li class="layui-col-xs4">
                                    <a title="" href="javascript:;" class="x-admin-backlog-body">
                                        <h2 style="color: black;">新单数量</h2>
                                        <p><cite style="color: #691818; ">@todayInfo.NewOrderNum (个)</cite></p>
                                    </a>
                                </li>
                                <li class="layui-col-xs4">
                                    <a title="" href="javascript:;" class="x-admin-backlog-body">
                                        <h2 style="color: black;">复购单数量</h2>
                                        <p><cite style="color: #691818; ">@todayInfo.RepurchaseOrder (个)</cite></p>
                                    </a>
                                </li>
                                <li class="layui-col-xs4">
                                    <a title="" href="javascript:;" class="x-admin-backlog-body">
                                        <h2 style="color: black;">今日送酒</h2>
                                        <p><cite style="color: #691818;">@todayInfo.GiftFrequency (次)</cite></p>
                                    </a>
                                </li>
                            </ul>
                            <blockquote class="layui-elem-quote">本月业绩</blockquote>
                            <ul class="layui-row layui-col-space10 layui-this x-admin-carousel x-admin-backlog">
                                <li class="layui-col-xs4">
                                    <a title="" href="javascript:;" class="x-admin-backlog-body">
                                        <h2 style="color: black;">本月总业绩</h2>
                                        <p><cite style="color: #691818;">@monthInfo.TotalFinalAmount (元)</cite></p>
                                    </a>
                                </li>
                                <li class="layui-col-xs4">
                                    <a title="" href="javascript:;" class="x-admin-backlog-body">
                                        <h2 style="color: black;">新单业绩</h2>
                                        <p><cite style="color: #691818; ">@monthInfo.NewOrderAmount (元)</cite></p>
                                    </a>
                                </li>
                                <li class="layui-col-xs4">
                                    <a title="" href="javascript:;" class="x-admin-backlog-body">
                                        <h2 style="color: black;">复购单业绩</h2>
                                        <p><cite style="color: #691818; ">@monthInfo.RepurchaseOrderAmount (元)</cite></p>
                                    </a>
                                </li>
                                <li class="layui-col-xs4">
                                    <a title="" href="javascript:;" class="x-admin-backlog-body">
                                        <h2 style="color: black;">本月总单量</h2>
                                        <p><cite style="color: #691818; ">@monthInfo.AddOrderNum (个)</cite></p>
                                    </a>
                                </li>
                                <li class="layui-col-xs4">
                                    <a title="" href="javascript:;" class="x-admin-backlog-body">
                                        <h2 style="color: black;">新单数量</h2>
                                        <p><cite style="color: #691818; ">@monthInfo.NewOrderNum (个)</cite></p>
                                    </a>
                                </li>
                                <li class="layui-col-xs4">
                                    <a title="" href="javascript:;" class="x-admin-backlog-body">
                                        <h2 style="color: black;">复购单数量</h2>
                                        <p><cite style="color: #691818; ">@monthInfo.RepurchaseOrder (个)</cite></p>
                                    </a>
                                </li>
                                <li class="layui-col-xs4">
                                    <a title="" href="javascript:;" class="x-admin-backlog-body">
                                        <h2 style="color: black;">累计送酒</h2>
                                        <p><cite style="color: #691818; ">@monthInfo.GiftFrequency (次)</cite></p>
                                    </a>
                                </li>
                                <li class="layui-col-xs4">
                                    <a title="" href="javascript:;" class="x-admin-backlog-body">
                                        <h2 style="color: #691818;">本月累计提成</h2>
                                        <p><cite style="color: red; ">@monthInfo.MyPerformanceAmount (元)</cite></p>
                                    </a>
                                </li>
                            </ul>
                        </div>
                    </div>
                </div>

                <fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;">
                    <legend>业绩排行榜</legend>
                </fieldset>

                <div class="layui-bg-gray" style="padding: 30px;">
                    <div class="layui-row layui-col-space15">
                        <div class="layui-col-md6">
                            <div class="layui-card">
                                <div class="layui-card-header">本月总业绩排名</div>
                                <div class="layui-card-body">
                                    <ul class="ranking-list">
                                        @if (PerformanceRanking != null && PerformanceRanking.Count > 0)
                                        {
                                            for (int i = 0; i < PerformanceRanking.Count; i++)
                                            {
                                                <li class="ranking-item">
                                                    <span class="cir-index order-color@(i > 2 ? "" : "-" + i)">@(i + 1)</span>
                                                    <span class="name">@PerformanceRanking[i].EmployeeName</span>
                                                    <span class="money">总业绩：@PerformanceRanking[i].TotalFinalAmount.ToString("F2") 元</span>
                                                    <span class="num">单量：@PerformanceRanking[i].AddOrderNum 个</span>
                                                </li>
                                            }
                                        }
                                    </ul>
                                </div>
                            </div>
                        </div>
                        <div class="layui-col-md6">
                            <div class="layui-card">
                                <div class="layui-card-header">本月总单量排名</div>
                                <div class="layui-card-body">
                                    @if (OrderRanking != null && OrderRanking.Count > 0)
                                    {
                                        for (int i = 0; i < OrderRanking.Count; i++)
                                        {
                                            <li class="ranking-item">
                                                <span class="cir-index order-color@(i > 2 ? "" : "-" + i)">@(i + 1)</span>
                                                <span class="name">@OrderRanking[i].EmployeeName</span>
                                                <span class="money">总业绩：@OrderRanking[i].TotalFinalAmount.ToString("F2") 元</span>
                                                <span class="num">单量：@OrderRanking[i].AddOrderNum 个</span>
                                            </li>
                                        }
                                    }
                                </div>
                            </div>
                        </div>
                    </div>
                </div>

                <fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;">
                    <legend>系统信息</legend>
                </fieldset>
                <div class="layui-bg-gray" style="padding: 30px;">
                    <div class="layui-row layui-col-space15">
                        <div class="layui-col-md12">
                            <div class="layui-card">
                                <div class="layui-card-body ">
                                    <table class="layui-table">
                                        <tbody>
                                            <tr>
                                                <th>系统版本</th>
                                                <td>1.0.0</td>
                                            </tr>
                                            <tr>
                                                <th>操作系统</th>
                                                <td>WINDOWS</td>
                                            </tr>
                                            <tr>
                                                <th>运行环境</th>
                                                <td>WINDOWS IIS7.0/(Win64) OpenSSL/1.0.2j mod_fcgid/2.3.9</td>
                                            </tr>
                                            <tr>
                                                <th>技术支持</th>
                                                <td>重庆智渔科技有限公司</td>
                                            </tr>
                                            <tr>
                                                <th>版权所有</th>
                                                <td>@@2024 - 2026智渔科技。版权所有</td>
                                            </tr>
                                        </tbody>
                                    </table>
                                </div>
                            </div>
                        </div>
                        <style id="welcome_style"></style>
                    </div>
                </div>
            </div>
        </div>
        <script src="~/Scripts/echarts.min.js"></script>
    </form>
</body>
</html>


